﻿// MIT License

// Copyright (c) 2021-2023 1024


using Newtonsoft.Json.Converters;
using System.Globalization;

namespace Kyx.Utils;

public class FixedIsoDateTimeOffsetConverter : IsoDateTimeConverter
{
    public override bool CanConvert(Type objectType)
    {
        return objectType == typeof(DateTimeOffset) || objectType == typeof(DateTimeOffset?);
    }

    public FixedIsoDateTimeOffsetConverter() : base()
    {
        this.DateTimeStyles = DateTimeStyles.AssumeUniversal;
    }
}